<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css" />
<link href='http://fonts.googleapis.com/css?family=Lobster'
	rel='stylesheet' type='text/css'>
<title>Inzy's Board - Write</title>

<script>
	// 자바 스크립트 시작

	function writeCheck() {
		var form = document.writeform;

		if (!form.mid.value) // form 에 있는 name 값이 없을 때
		{
			alert("이름을 적어주세요"); // 경고창 띄움
			form.mid.focus(); // form 에 있는 name 위치로 이동
			return;
		}

		if (!form.pwd.value) {
			alert("비밀번호를 적어주세요");
			form.pwd.focus();
			return;
		}

		if (!form.subject.value) {
			alert("제목을 적어주세요");
			form.subject.focus();
			return;
		}

		if (!form.content.value) {
			alert("내용을 적어주세요");
			form.content.focus();
			return;
		}

		form.submit();
	}
</script>

<style>
#list_input {
	font-size: 14px;
	font-family: 'Nanum Gothic', sans-serif;
	background: #160952;
	color: white;
	border: 4px solid #160952;
	margin: 3px;
}

#board_pos {
	width: 700px;
	height: 540px;
	padding-top: 30px;
	font-size : 12px;
	background-color: transparent;
	color: black;
	font-size: 12px;
}

#board_main {
	background-size: 100%;
	background-image: url(../images/boardbg-2.png);
	width: 100%;
	height: 570px;
}

#board_hr {
	margin-bottom: 20px;
	font-family: 'Lobster', cursive;
	font-size: 40px;
	color: #fb586c;
	font-weight: bold
}

textarea {
	font-family: 'Nanum Gothic', sans-serif;
}

#list_title,#list_item {
	line-height: 180%; /* 줄 간격 */
	display: table-cell;
}

#list_content {
	width: 500px;
	height: 230px;
	margin: 10px;
}


#list_title {
	width: 120px;
	background-color: #160952;
	color: white;
	font-family: 'Nanum Gothic', sans-serif;
	font-size: 14px;
}

#list_item {
	width: 380px;
	font-family: 'Nanum Gothic', sans-serif;
	font-size: 14px;
}

#list_item input{
	font-family: 'Nanum Gothic', sans-serif;
}

#list_line {
	width: 500px;
	height: 1px;
}

input[type=text] {
	width: 90%;
	line-height: 180%;
	margin-left: 10px;
	font-family: 'Nanum Gothic', sans-serif;
}

input[type=password] {
	width: 50%;
	line-height: 180%;
	 margin-left: 10px;
}
</style>

</head>
<body>
	<div id='board_main'>
		<div align='center'>
			<div id='board_pos'>
				<h1 id='board_hr'>New Content</h1>
				<form name="writeform" method="post"
					action="Main.jsp?inc_content=../board2/register_result.jsp"
					enctype="multipart/form-data">

					<div id='list_title'>제목</div>
					<div id='list_item'>
						<input type="text" name="subject">
					</div>
					<p />

					<div id='list_line'
						style='background-color: #dddddd; margin-top: 3px; margin-bottom: 3px;'></div>

					<div id='list_title'>이름</div>
					<div id='list_item'>
						<input type="text" name="mid" readonly value=<%=(String)session.getAttribute("mid") %>>
					</div>
					<p />

					<div id='list_line'
						style='background-color: #dddddd; margin-top: 3px; margin-bottom: 3px;'></div>

					<div id='list_title'>비밀번호</div>
					<div id='list_item'>
						<input type="password" name="pwd">　비밀 번호 4자리를 입력.
					</div>
					<p />

					<div id='list_line'
						style='background-color: #dddddd; margin-top: 3px; margin-bottom: 3px;'></div>

					<div id='list_title'>첨부파일</div>
					<div id='list_item'>
						<input type="file" name="filename">
					</div>
					<p />

					<div id='list_line'
						style='background-color: #dddddd; margin-top: 3px; margin-bottom: 3px;'></div>

					<div id='list_content'>
						<textarea name="content" style="width: 100%; height: 100%;"></textarea>
					</div>


					<div id='list_line'
						style='background-color: #dddddd; margin-bottom: 10px;'></div>


					<input type='button' value="등록" id='list_input' OnClick="javascript:writeCheck();">
					<input type='button' value="취소" id='list_input' OnClick="history.back()">

				</form>
			</div>
		</div>
	</div>
</body>
</html>